<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
 <title>贵美商城-商品分类页</title>
 <link rel="stylesheet"	type="text/css"	href="css/global.css"	/>
 <link rel="stylesheet"	type="text/css"	href="css/layout.css"	/>
 <script type="text/javascript" src="js/jquery.js"></script>
 <script type="text/JavaScript" defer="true">
    $(function(){
 	     $("#spanProductId").click(function(){
 	     var productId = $("#productId").val();
 	    
 	         $.ajax({
		         data:{"productId":productId},
		         
		         type:"POST",
		         url:"addItemAction",
		         success:function(msg){
	                alert(msg.msg);
             }
         })
         });
 	});
 	
 	
	var oImg=document.getElementById("show").getElementsByTagName("img");
	for(var i=1;i<=(oImg.length-3);i++){
		oImg[i].onmouseover=function(){oImg[0].src=this.src.replace('.jpg','_big.jpg');
			this.style.border='2px #ff7300 solid';}
		oImg[i].onmouseout=function(){this.style.border='2px #ccc solid';}
 	}
 </script>
</head>
<body>
<div id="container">
	<iframe id="header" src="header.jsp" width="980" height="136" frameborder="0" scrolling="no"></iframe>
	<div class="good">
		<h1>${product.describe }</h1>
		<ul class="f_l" id="show">
		    <input type="hidden" value="${product.productId }" id="productId">
			<li class="bigimg"><img style="width:315px;height: 262px" src="${product.picpath }" alt="${product.productName }" /></li>
			<li class="smallimg"><img src="images/show1.jpg" alt="小图1" /></li>
			<li class="smallimg"><img src="images/show2.jpg" alt="小图2" /></li>
			<li class="smallimg"><img src="images/show3.jpg" alt="小图3" /></li>
			<li class="smallimg"><img src="images/show4.jpg" alt="小图4" /></li>
			<li class="smallimg"><img src="images/show5.jpg" alt="小图5" /></li>			
			<li class="op clear f_l"><a href="#"><img src="images/share.gif" alt="分享" /></a></li>
			<li class="op f_l"><span id="spanProductId"><img src="images/favthis.gif" alt="藏" /></span></li>			
		</ul>
		<ul class="goodinfo f_l">
			<li>一 口 价：<span>${product.originalPrice * product.discount / 10 }</span></li>
			<li>运　　费：<span>${product.fare }</span></li>
			<li class="h74 buynow"><a href="addCart?productId=${product.productId }"><img src="images/buynow.gif" alt="alt" /></a></li>
			<li class="onlinepay">此商品支持<a href="#">网银支付</a>，网上汇款免手续费。<br />收货满意后出售者才能拿钱，货款都安全！</li>
			<li>剩余时间：<span>10天23小时</span></li>
			<li>本期售出：<span>${product.currSell }</span></li>
			<li>累计售出：<span>${product.totalSell }件</span></li>
			<li class="f_l w175">商品类型：<span>全新</span></li>
			<li>所 在 地：<span>${product.address }</span></li>
			<li class="f_l w175">商品库存：<span>${product.stock }件</span></li>
			<li>浏 览 量：<span>${product.browTimes }次</span></li>			
		</ul>
	</div>
	<iframe id="footer" src="footer.jsp" width="980" height="136" frameborder="0" scrolling="no"></iframe>
</div> <!--container end-->	
</body>
</html>
